Technical Field of the Invention
The present invention relates to the network address translation (NAT) methodology, particularly to a NAT traversal method and a system for mediating connection.
Description of the Related Art
The reason of the popularization of the network address translation (NAT) starts from the problem of insufficient address and uneven address distribution in the Internet Protocol version 4 (IPV4). Multiple hosts have to be disposed behind a router in the local network and share the public Internet Protocol (IP) address of the router when connecting to the external network. Conceptually, the NAT can be divided to four types: full-cone, address-restricted-cone, port-restricted-cone, and symmetric, wherein in the symmetric type NAT, when hosts in the local network use the same private IP address and port to send packets to different hosts outside the local network, they are also given different sets of public IP address and port in the router.
Generally, hosts in the local network do not have the authority to control the behavior of the gateway. Therefore, when a peer-to-peer communication traversing the NAT firewall is needed, precise prediction of the port dispatching rule of the NAT firewall to the external network and informing the other host the rule are the most important things. The known method needs to apply Session Traversal Utilities for NAT (STUN) protocol. However, the algorithm of STUN is very complex and does not apply to the symmetric NAT of common enterprise networks.